package com.zy.ivideo.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.util.Date;

@Entity
@EntityListeners(AuditingEntityListener.class)
@Data
@Table(name = "b_multitype_video")
public class MultitypeVideoEntity {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @Column()
    private Long albumid;

    @Column()
    private String title;

    @Column()
    private String year;

    @Column()
    private String intro;

    @Column()
    private String taglist;

    @Column()
    private String arealist;

    @Column()
    private String actorlist;

    @Column(length = 200)
    private String shareurl;

    @Column(length = 200)
    private String subtitle;

    @Column(length = 50)
    private String duration;

    @Column(length = 50)
    private String languageinfo;

    @Column(length = 200)
    private String toutiaolvideotext;

    @Column()
    private Long albumgroupid;

    @Column()
    private Long favoritecount;

    @Column(length = 100)
    private String userid;

    @Column()
    private String cover_url;

    @Column()
    private String cover_uri;

    @Column()
    private Double cover_width;

    @Column()
    private Double cover_height;

    @Column()
    private String cover_urllist;

    @Column()
    private String cover_largeurllist;

    @Column()
    private String cover_mediumurllist;

    @Column()
    private String cover_thumburllist;

    /**
     * 创建日期
     */
    @CreatedDate
    @Column()
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date ctime;

    @Column()
    private String verifycode;

    @Column()
    private int videotypeid;

    /**
     * 视频路径
     */
    @Column()
    private String videopath;

    /**
     * 视频贴图主图
     */
    @Column()
    private String videomainimag;

    /**
     * 播放数量
     */
    @Column(name = "playnum",columnDefinition = "int DEFAULT 0 COMMENT '播放数量'")
    private int playnum;

    /**
     * 评论数量
     */
    @Column(name = "commentnum",columnDefinition = "int DEFAULT 0 COMMENT '评论数量'")
    private int commentnum;

    /**
     * 点赞数量
     */
    @Column(name = "agreenum",columnDefinition = "int DEFAULT 0 COMMENT '点赞数量'")
    private int agreenum;

    /**
     * 收藏数量
     */
    @Column(name = "collectionnum",columnDefinition = "int DEFAULT 0 COMMENT '收藏数量'")
    private int collectionnum;


}
